package com.tsd.jxc.buy.service;

import com.tsd.core.vo.PageBean;
import com.tsd.jxc.buy.entity.JxcBuyOrderDetail;
import com.tsd.jxc.buy.entity.JxcBuyOrderDetailExt;
import com.tsd.jxc.buy.entity.JxcBuyOrderExt;
import com.tsd.system.entity.SysUser;

import java.util.List;
import java.util.Map;

/**
 * 描述：JxcBuyOrderDetail服务实现层接口
 *
 * @author Hillpool
 * @date 2022/07/29 15:00:45
 */
public interface JxcBuyOrderDetailService {

    /**
     * 描述：根据id获取JxcBuyOrderDetail
     *
     * @param id
     */
    JxcBuyOrderDetail getJxcBuyOrderDetailById(Long id) throws Exception;

    /**
     * 描述：根据sid获取JxcBuyOrderDetail
     *
     * @param sid
     */
    JxcBuyOrderDetailExt queryBySid(String sid) throws Exception;

    List<JxcBuyOrderDetailExt> queryValidByOrderList(List<String> order_list);

    List<JxcBuyOrderDetailExt> queryValidBySidList(List<String> sid_list);

    /**
     * 描述：根据sid列表删除JxcBuyOrderDetail
     *
     * @param list
     */
    void deleteJxcBuyOrderDetails(List<String> list, SysUser opUser) throws Exception;

    /**
     * 描述：保存或更新JxcBuyOrderDetail
     *
     * @param record
     * @param opUser
     */
    void saveJxcBuyOrderDetail(JxcBuyOrderDetail record, SysUser opUser) throws Exception;

    /**
     * 保存采购单内的详情
     *
     * @param record
     * @param basePrice 是否基于价格计算总价，如果不是则是基于总价计算单价
     * @param opUser
     * @throws Exception
     */
    void saveJxcBuyOrderDetail(JxcBuyOrderExt record, boolean basePrice, SysUser opUser) throws Exception;

    /**
     * 描述：根据params分页查询JxcBuyOrderDetail
     *
     * @param params
     * @param page
     */
    List<JxcBuyOrderDetailExt> findJxcBuyOrderDetails(Map<String, Object> params, PageBean page) throws Exception;

    List<JxcBuyOrderDetailExt> findJxcBuyOrderDetails4Select(Map<String, Object> params, PageBean page) throws Exception;

    /**
     * 描述：根据params分页查询JxcBuyOrderDetail
     *
     * @param params
     */
    List<JxcBuyOrderDetailExt> findJxcBuyOrderDetails(Map<String, Object> params) throws Exception;

    List<JxcBuyOrderDetailExt> queryJxcBuyOrderDetailList4Return(Map<String, Object> params, PageBean page) throws Exception;

}